<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>jb-aptech毕业设计项目</TITLE>
<meta name="renderer" content="ie-comp">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../css/style.css" rel="stylesheet" type="text/css">
<script src="../../script/common.js"></script>
	<script src="../../../js/jquery-3.3.1.min.js"></script>
	<script src="../../../js/vue.js"></script>
	<script src="../../../js/bootstrap.min.js"></script>
</head>
<body>

<div class="page_title">客户服务管理 &gt; 服务处理</div>
<div id="xgcs">
<div class="button_bar">
	<button class="common_button" onclick="help('');">帮助</button>
	<button class="common_button" onclick="back();">返回</button> 
	<button class="common_button" type="button" @click="updateCs()">保存</button>
</div>
<table class="query_form_table">
	<tr>
		<th>编号</th>
		<td><input disabled v-model="cs.svr_id"></td>
		<th>服务类型</th>
		<td><input disabled v-model="cs.svr_type"></td>
	</tr>
	<tr>
		<th>概要</th>
		<td colspan="3"><textarea rows="6" cols="50" disabled v-model="cs.svr_title"></textarea></td>
	</tr>	
	<tr>
		<th>客户</th>
		<td><input disabled v-model="cs.svr_cust_name"></td>
		<th>状态</th>
		<td><input disabled v-model="cs.svr_status"></td>
	</tr>	
	<tr>
		<th>服务请求</th>
		<td colspan="3"><textarea rows="6" cols="50" v-model="cs.svr_request" disabled></textarea><br>
　</td>
	</tr>
	<tr>
		<th>创建人</th>
		<td><input disabled v-model="cs.svr_create_by"></td>
		<th>创建时间</th>
		<td><input disabled v-model="cs.svr_create_date"></td>
	</tr>
	</table>
<br />
<table class="query_form_table" id="table3">
	<tr>
		<th>分配给</th>
		<td><input disabled v-model="cs.svr_due_to"></td>
		<th>分配时间</th>
		<td><input  disabled v-model="cs.svr_due_date"></td>
	</tr>
</table>
<br />	
<table class="query_form_table" id="table1">
	<tr>
		<th>服务处理</th>
		<td colspan="3"><textarea rows="6" cols="50" v-model="cs.svr_deal"></textarea><span class="red_star">*</span></td>
	</tr>
	<tr>
		<th>处理人</th>
		<td><input disabled size="20" v-model="cs.svr_deal_by"/>
			<input type="hidden" v-model="cs.svr_deal_id">
			<span class="red_star">*</span></td>
		<th>处理时间</th>
		<td><input disabled size="20"  v-model="cs.svr_deal_date"/><span class="red_star">*</span></td>
	</tr>
	<input type="hidden" v-model="cs.svr_status">
</table>

</div>
<br />
<table disabled class="query_form_table" id="table2">
	<tr>
		<th>处理结果</th>
		<td><input name="T10" size="20" disabled/><span class="red_star">*</span></td>
		<th>满意度</th>
		<td>
			<select name="D1" disabled>
				<option>请选择...</option>
				<option>☆☆☆☆☆</option>
				<option>☆☆☆☆</option>
				<option>☆☆☆</option>
				<option>☆☆</option>
				<option>☆</option>
			</select><span class="red_star">*</span></td>
	</tr>
</table>
<script>
	setCurTime('t3');
</script>
</body>
<script>
    var app=new Vue({
        el:"#xgcs",
        data:{
            cs:{
                svr_deal:'',
                svr_deal_by:'',
                svr_deal_id:'',
                svr_deal_date:'',
            },
        },
        methods:{
            updateCs(){
                $.get("/updateCs",this.cs, function (json) {
                    if (json.code == 200) {
                        alert("处理完成！");
                        location.href='deal.html';
                    } else {
                        alert("处理失败！");
                    }
                });
            },

        },
        created(){
            var all;
            var time=new Date();
            var year=time.getFullYear();
            var month=time.getMonth()+1;
            var date=time.getDate();
            var day=time.getDay();
            var hour=time.getHours();
            var minu=time.getMinutes();
            var ms=time.getSeconds();

            all=year+"-"+month+"-"+date+" "+hour+":"+minu+":"+ms;

            let id=sessionStorage.getItem("id");
            $.getJSON("/queryCstSerById/"+id,function(json){
                app.cs=json.data.cs;
                app.cs.svr_deal_date=all;

                userstwo=JSON.parse(localStorage.getItem("loginuser"));
                app.cs.svr_deal_by=userstwo.usr_Name;//得到登录者名字
                app.cs.svr_deal_id=userstwo.usr_Id;
            });
        }
    });
</script>
</html>